package com.bill.springcloud.config.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 获取配置文件信息
 * @fileName: ConfigController.java
 * @author: bin.li01
 * @date: 2018/2/7 13:57
 * @version: v1.0.0
 */
@RestController
@RefreshScope
public class ConfigController {

    @Value("${name}")
    private String name;

    @RequestMapping("/name")
    public String getName(){
        return name;
    }


}
